Start populations in the lower third of the simulation and let them move as they co-evolve. It is possible that as newts and snakes move into new territory they might create more spatial phenotype correlation.
What does it mean to be correlated? Might this occur if I simulate some semi-controlled movement?
I am running a coevolution experiment where newts and snakes interaction with each other over long periods of time. When they interact the newt or snake with the highest level of toxicity or resistance will survive. As newts and snake interact across space, they develop exaggerated traits that can become spatial correlated. My experiments examine when traits became exaggerated or correlated.
I created a simulation study to observe the co-evolutionary outcome of the newt-snake interaction with different genetic architectures (GAs) in a spatial setting. I hypothesized that we would see an interaction (co-evolutionary arms race) between newt and snake phenotype under some GA combinations when newts and snakes were evolving over geographical space. Each GA is paired with another GA creating 16 combinations.
GA1 experiment values:
Each GA combination and trial has its own msprime simulation. I start both the newt and snake population in the bottom third section of my map. Over time they eventually disperse into the entire map. The background enverionment is homogeneous.
## All cor, lit, and grid files exist!
## This program will now end!
In this first section I look at the entire populations mean phenotype for both snakes (blue) and newts (red). The difference between mean snake and mean newt phenotype is shown on the black line. For each GA combination there are 4 sets of lines (red, blue, black). Each line is a different trial with the same simulation parameters. I also present the average difference (of the trials) between snake and newt phenotype in the table of average differences.
## Group.1 x
## 1 1e-08_0.005_1e-08_0.005 -0.03323921
## 2 1e-08_0.005_1e-09_0.05 -1.30511227
## 3 1e-08_0.005_1e-10_0.5 -2.50095446
## 4 1e-08_0.005_1e-11_5 -1.19918146
## 5 1e-09_0.05_1e-08_0.005 1.33051637
## 6 1e-09_0.05_1e-09_0.05 -0.43179017
## 7 1e-09_0.05_1e-10_0.5 -1.13158335
## 8 1e-09_0.05_1e-11_5 -0.48635858
## 9 1e-10_0.5_1e-08_0.005 2.03584772
## 10 1e-10_0.5_1e-09_0.05 0.39730616
## 11 1e-10_0.5_1e-10_0.5 -0.73000969
## 12 1e-10_0.5_1e-11_5 -0.40944406
## 13 1e-11_5_1e-08_0.005 0.98550774
## 14 1e-11_5_1e-09_0.05 -0.79978450
## 15 1e-11_5_1e-10_0.5 -1.42371425
## 16 1e-11_5_1e-11_5 -0.60451822
There are some interesting differences taking place here, when compared to simulation without movement and maps. It seems like it takes a bit longer to reach a steady state (but this could also be the stochasticity of the simulation). The mean newt and snake phenotype get to similar values as my original simulations. Still follows what I have seen before, the mean phenotypes of newts and snakes go up, until they reach an equilibrium.
Here I plot the interaction between newt/snake phenotype and population size. Typically, when a species had a higher phenotype they also had a larger population size. This relation between phenotype and population size had specific outcomes that depended on the GA of newts and snakes.
The first figure compares the population size of newts and snakes to the difference between mean snake and mean newt phenotype for a time slice (5,000-10,000 generations). Color in this plot is the difference between snake and newt phenotype, with blue indicating snakes have a larger phenotype and red indicating newts have a larger phenotype. Cream color points indicate that the two phenotypes are nearly the same. The second figure present the histograms of the difference between snake and newt population size (green) and phenotype (purple) for a time slice (5,000-10,000 generations).
These results are similar to what I have seen before. There might be an increase in the differences between snake and newt phenotype, but the overall message higher phenotype = more individuals in unchanged. However, the layout of the points seems to be flatter and stretched.
The next section I am examining the spatial correlation between newt and snake phenotypes and I predicted that there would be a positive correlation between the phenotypes. I first look at the correlation between mean newt phenotype and mean snake phenotype for each of the four trials in every GA combination from 10,000-15,000 generations. The solid line is a 0 with a dashed line at the level of correlation seen in natural newt-snake population(s).
The spatial phenotype correlation seems very random.
In order to understand how spatial correlations where changing with time I took 5,000 generation time slices to look at all four trials correlation values. Each color is a different trial per GA combination. The histogram values are stacked.
It seems like there is an increase in phenotype spatial correlation near the beginning of the simulation (<25,000 generations), but as time goes on it is lost. The spatial phenotype correlation is also lower than the spatial correlation that result from simulations run with a gradient map.
Next, I examine three randomly chosen plots. Time (in generations) in on the x-axis and both mean phenotype and phenotype spatial correlation in on the y-axis. Newt whole population mean phenotype is red, while snake mean phenotype is blue. The pink line is the phenotype spatial correlation.
## [1] "pattern 1e-11_5_1e-11_5_1"
## [1] "Cor between average snake pheno and local cor 0.150838783823117"
## [1] "Cor between average newt pheno and local cor 0.0832288209042323"
## [1] "Cor between average dif pheno and local cor 0.167554875753607"
## [1] "Cor between newt pheno and snake 0.917907920059721"
## [1] "pattern 1e-10_0.5_1e-09_0.05_0"
## [1] "Cor between average snake pheno and local cor 0.221502743925183"
## [1] "Cor between average newt pheno and local cor 0.455354105102473"
## [1] "Cor between average dif pheno and local cor -0.518111276586718"
## [1] "Cor between newt pheno and snake 0.827712945058146"
## [1] "pattern 1e-11_5_1e-10_0.5_3"
## [1] "Cor between average snake pheno and local cor 0.153937980340856"
## [1] "Cor between average newt pheno and local cor 0.272943226627174"
## [1] "Cor between average dif pheno and local cor -0.090384383684638"
## [1] "Cor between newt pheno and snake 0.628503059321802"
Most of these plots show that as time increases both the mean newt & snake phenotype. Some of these plots have an increase in the spatial phenotype correlation (pink line), but this increase in the correlation between local newt and snake phenotypes can also seem very random. Sometimes the spatial phenotype correlation increases and then decreases overtime. Under certain GA combinations (both 1e09_0.05) spatial phenotype correlation increases the most when the newt and snake mean phenotypes are increasing the most.
This next section is just getting a glimpse at how newt & snake phenotype and population size differ over time. The populations start off with about 250 individuals each. Each individual has a different genetic background created from msprime. Then each msprime simulation is put into slim and data is generated. Plots show newt by snake population size, with the point color representing the difference between mean snake and newt phenotype (red=newts have a higher phenotype and blue=snakes have a higher phenotype). The other plots show histograms of difference between snakes and newts phenotype and population size (purple and green).
The results looked similar to results that I have seen in other experiments, with an exception at the beginning. In the beginning of the simulation both newt and snake population grows, but this growth has a longer tail do to the populations expanding territory. The population size reaches a steady point and then newts and snakes co-evolve. In the middle part of my simulation, the difference between newt and snakes mean phenotype solidifies. Often, the difference in mean phenotype decreases (where compared to the beginning of the simulation). When the GA has a high mutation rate and low mutation effect size (GA 1), the difference in mean phenotype grows. This leads to the species with GA 1 losing the co-evolutionary arms race. More frequent smaller steps does not help a species win in an arms race (might also be due to lower mutational variance). The histograms reflect what is seen in the scatter plots.
In the summary section, I try to come up with a way to show how different GA combinations can change the simulations results. In all of these plots snakes GA is represented by color and newt GA is represented by shape. There 16 color-shape combinations (with 4 repeats for trials). There are four sets of plots: 1) newt by snake population size, 2) phenotype difference by snake population size, 3) phenotype difference by snake GA, and 4) phenotype difference by newt GA. There are three figures in each set, taken at the begging, middle, and end time chunks.
Overall, these plots are very similar to the plots seen with and without a gradient map. The largest difference is seen from plots at the beginning of the simulation. At the beginning of the simulation the points are more spread out (less in a line), eventually they form the line of shapes and colors seen in my previous simulations. There are clusters of points that create lines of shapes and lines of colors. The best GA for newts and snakes was 1e-09_0.05 (can be seen as green near the top of all the lines of shapes and triangles near the bottom right look at all the lines of color). It is interesting to see how these points spread apart, but remain similar between trials. When putting these figures together it seems like the population size of snakes is lower when the newt phenotype is larger than the snake phenotype.
In the heatmap plots each GA combination and trails is presented by combining newt GA in the x-axis to snake GA and trial number in the y-axis. The result is the color in that section. There are two types of heatmap plots shown below. One shows the average snake population size for a time chunk with darker colors indicating a smaller snake population and lighter colors indicating a larger snake population. The other heatmap shows the average difference between snake and newt mean phenotype (red=newts had a higher phenotype, blue=snakes had a higher phenotype). I look at 3 time slices for both types of heatmaps
As with results seen in the summary plots, the heat map plots tell a similar story. At the beginning of the simulation the snake population size and the mean difference between snake and newt phenotype varies a lot between the simulation trials, more than any other simulation that I have currently run. But by the end of the simulation the results remain similar to all of the other simulations that I have run. Theses plots shows that under certain GA either newts or snakes have an co-evolutionary advantage (best GAs 1e-9(0.05)^2 = 2.5e-12 or 1e-10(0.5)^2 = 2.5e-11).
This section goes over the results from the local measurements (grid calculations). I divided my map up into smaller area (grids) and calculated mean phenotype, max phenotype, min phenotype, and population size. In each of these plots newts are represented by circles and snakes are represented by squares. Parameter values increase from a dark color to a lighter color (green-blue themed for phenotype, orange-pinked themed for population size) There is also a subplot that plots each parameter (mean, max, …) of newt by snake colored by map location (red=corner, green=edge, blue=middle). I look at the one simulation at one time in the begging and end.
## [1] 0.4002541
## [1] 0.4181679
## [1] 0.1298847
## [1] 0.5833832
## [1] 0.200901
## [1] 0.1563885
## [1] 0.09847233
## [1] 0.409964
These results are interesting, they show that movement might create an increase in spatial phenotype correlation, but that this correlation disappears over time. Very interesting results.